import { GET, POST,POSTJSON, PUT, DELETE,POSTFORM } from './index'
import wxUrlConfig from '@/common/config.js'

//
const conversationCreate = params => {
	const url = '/conversation/create'
	var params = {}
	return new Promise (resolve => {
			GET(url,params).then(res=>{
				console.log(res)
				resolve(res)
			})
	})
}

// coze 发送对话
const sendChat=params=>{
    const url = '/coze'
	var params = {
		msg: params.message
	}
    return new Promise (resolve => {
        GET(url,params).then(res=>{
					console.log(res)
					resolve(res)
        })
    })
}

// coze_工作流
const  getWorkflowRun = params => {
	return new Promise(resolve => {
		POSTJSON('/api/workflow/run', params).then(res => {
			resolve(res)
		})
	})
}


module.exports = {
	conversationCreate,
  sendChat,
	getWorkflowRun}
